#!/usr/bin/env python
#    tddft_tda
#    ---------
#    Molecule:         H2O
#    Wave Function:    Combined functional (Turbomole version of B-P86) with TDA
#    Test Purpose:     Tamm-Dancoff approximation to TDDFT calculation of excitation energies

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

f.add(string = 'Final DFT energy',
      rel_tolerance = 1.0e-8)

f.add(string = '@ Excitation energy :',
      rel_tolerance = 1.0e-5)
f.add(string = '@ Oscillator strength (LENGTH)',
      ignore_below = 1.0e-4,
      ignore_sign = True,
      abs_tolerance = 1.0e-4)

test.run(['tddft_tda.dal'], ['H2O_cc-pVDZ.mol'], f={'out': f})

sys.exit(test.return_code)
